<?php
//$arrC = file("http://lotto.uuss.net/k_admin/Supplement/index.php?op=sendOdds&LottoID=1&GambleID=281&Bet_Type=1,2,3,16&isSpecial=1&isStopBet=1&isRealShow=1&strLottoNumber=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49&ChangeGameType=No&GameType=1&rop=sendOdds");

//eval(join("", $arrC));
//print_r($arrGame);


$cookie = $_SERVER["DOCUMENT_ROOT"]."/tmp/cookie.txt";
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_TIMEOUT, 10);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array(
			"Accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-shockwave-flash, */*",
			"Accept-Language:zh-tw",
			"Accept-Encoding:gzip, deflate",
			"User-Agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)",
			"Host:lotto.uuss.net",
			"Connection:Keep-Alive"));

curl_setopt($ch,CURLOPT_URL,"http://lotto.uuss.net/index.php?lang=1");
$ret=curl_exec ($ch);
//print htmlspecialchars($ret);
ereg("PHPSESSID(.+)", join(",", file($cookie)), $arrV);
print $arrV[1];
?>